Fix locating of version when tagging Docker images on Git tag push#1834
Conversation
.github/workflows/docker.yml
Outdated
| type=semver,pattern={{major}}.{{minor}},value=${{ github.ref_name }},prefix=lychee- | ||
| type=semver,pattern={{major}},value=${{ github.ref_name }},prefix=lychee- | ||
| type=semver,pattern=lychee-{{version}} | ||
| type=semver,pattern=lychee-{{major}}.{{minor}} |
There was a problem hiding this comment.
If I understand correctly, pattern helps the action locate the version string itself to use to tag the Docker image. I think the fact that pattern is just currently the whole tag is why there are build warnings: https://github.com/lycheeverse/lychee/actions/runs/17205362504/job/48804656733#step:3:54.
I think prefix would add lychee- to the version that's found for tagging the Docker image - perhaps that's wanted so that it matches the tag. The last version tagged with a version number was simply tagged 0.15.0 (https://hub.docker.com/layers/lycheeverse/lychee/0.15.0/images/sha256-f71cb370f67fe81eccab4a8b0ff0539c2859f6fd1c80087078922eba07f9dace) and 0.15.0-alpine (https://hub.docker.com/layers/lycheeverse/lychee/0.15.0-alpine/images/sha256-18cf46741b0a92244c55670895cf7893c75f19f097f469c1274bf6b53c197ece).
|
@mre Could you review this one against the documentation for I'm imaging that if, for example, this change was in place when the
If correct, there would've been, in the end:
Does that make sense? Have I missed anything? Is that the tagging scheme you want, or do you want something different? |
|
Didn't take a look yet, but just posting a comment that this would affect the docs at https://github.com/lycheeverse/lycheeverse.github.io as well. Maybe some other places, too? Can't think of any right now, but if someone depends on the Docker image tagging, then now is the time speak up. 😆 |
@mre Would this look dramatically different to what the project produced before the move to |
3984fe1 to
ac3e4c7
Compare
|
@mre Based on the comment from @aravindan888 here: #1833 (comment), I've added back CC @trask WDYT @aravindan888? |
ac3e4c7 to
745f46c
Compare
|
@mre Did you need me to do anything else on this one? Or is it just left open for comment? |
|
Sorry, there's one comment here, which should be addressed before merging. |
Thanks for taking a look @mre. I think I addressed that, and mentioned in this comment: #1834 (comment). So I've put back |
745f46c to
903d7bc
Compare
|
@mre I've also added another commit: 88c48a2 to fix an error with a job (https://github.com/lycheeverse/lychee/actions/runs/18024185042/job/51287994384) I got when I rebased this PR. Not sure what changed, but explicitly specifying |
Also remove tagging major version only, because it would resolve to 'version 0' at the moment.
88c48a2 to
51a8259
Compare
@mre I've now removed that commit because it's been fixed upstream. |
|
Looks fine to me. I don't yet know what implications it will have downstream, but we'll see about that. But from my side, this is worth merging to try and fix the Docker tags. Thanks for the work and for your patience, @eread. |
To contribute to #1833
Fix locating of version when tagging Docker images on Git tag push and also remove tagging major version only, because it would resolve to 'version 0' at the moment.